<template>
	<view>
		<!-- 底部购物车 -->
		<view class="shop-cart" v-if=" tag != 'page' && currentTab != 1 && currentTab != 2 " style="z-index:102;">
			<view class="tips" v-if="!showCart && showAddBtn" @tap="addMoney" key="add_money">
				<lang keywords="加X1就能配送" :X1="storeInfo.extra_price" unit="yuan" :needUpdate="true"></lang>
				<view class="block-in" >
					<lang class="btn" keywords="[确认加钱]"  key="add_money_btn"></lang>
				</view>
			</view>
			<view class="tips" v-if="!showAddBtn && (collectGoods.length > 0 || discountTip)" key="add_goods" @click='clickShow($event)' data-name='showCollect'>
				<text>{{discountTip}}</text>
				<view class="block-in" v-if="!showCollect && collectGoods.length > 0">
					<text>，</text>
					<lang keywords="去凑单" key="add_goods_btn"></lang>
					<text style="margin-left: 4px;">></text>
				</view>
			</view>
			<view class="select-goods collect-list" :class="showCollect ? 'active' : ''" v-if="!showCart">
				<view class="line-wrapper m1 goods-items border-b" v-for="(item, index) in collectGoods" :key="index" >
					<view class="name">
						<view>{{item.product_name}}</view>
					</view>
					<view>{{currency + item.product_price}}</view>
					<view style="flex: 1.5;display: flex;justify-content: flex-end;width: 80px;flex-shrink: 0;">
						<count :goods="item"  @getGoods="getGoods"></count>
					</view>
				</view>
			</view>
			<view  :class="'cart-goods ' + (showCart ? 'active' : '')" v-if="list.length > 0 && !showCollect">
			<view class="line-wrapper">
				<view>
					<lang keywords="已选商品"></lang>
				</view>
				<view class="flex" @tap="clearCart">
					<text class="iconfont icon-shanchu"></text>
					<lang keywords="清空购物车"></lang>
				</view>
			</view>
			<view class="select-goods">
				<view class="line-wrapper m2 goods-items border-b" v-for="item in list" :key="item.uniqueness_number" v-if="item.num > 0">
					<view class="name">
						<view>{{item.name}}</view>
						<view class="flavor">
							<text v-if="item.str">{{item.str}}</text>
						</view>
					</view>
					<view>{{currency + item.price}}</view>
					<count :goods="item" :isGoodsPage="true" @getGoods="getGoods"></count>
				</view>
				<view class="line-wrapper m3 goods-items border-b" v-if="showAdd">
					<view class="name"><lang keywords="加价送"></lang></view>
					<view>
						{{currency + storeInfo.extra_price}}
					</view>
					<view class="add-btn">
						<text class="iconfont icon-jian" :style="'color:' + mainColor" @tap="cancelAdd"></text>
						<text class="num">1</text>
						<text class="iconfont icon-jia" style="color:#999"></text>
					</view>
				</view>
				<view class="line-wrapper m4 goods-items" v-if="packPrice > 0">
					<view class="name">
						<view>
							<lang keywords="打包费"></lang>
						</view>
					</view>
					<view style="text-align:right;">
						{{currency + packPrice}}
					</view>
				</view>
			</view>
			</view>
			<view class="cart">
				<view :class="'icon ' + (cartNum > 0 ? 'active' : '')" :style="'background:' + (cartNum > 0 ? mainColor : '') + ';'"
				 @click.stop="openCart">
					<text class="iconfont icon-gouwuche1"></text>
					<text class="num" v-if="cartNum > 0">{{cartNum}}</text>
				</view>
				<view class="info">
					<view class="left">
						<!-- <view class="delivery" v-if="cartNum == 0 && !open_multilingual">
							<lang keywords="另需配送费" right="true"></lang>
							{{currency + storeInfo.delivery_money}}
							<lang v-if="storeInfo.deliver_type == '2' || storeInfo.deliver_type == '3' || storeInfo.deliver_type == '4'" keywords="可自取" right="true" style="margin-left: 10px;"></lang>
						</view> -->
						<view class="total" v-if="cartNum > 0">
							<view class="price">
								{{currency + totalPrice}}
							</view>
							<!-- <view class="fee" v-if="!open_multilingual">
								<lang keywords="另需配送费" right="true"></lang>
								{{currency + storeInfo.delivery_money}}
								<lang v-if="storeInfo.deliver_type == '2' || storeInfo.deliver_type == '3' || storeInfo.deliver_type == '4'" keywords="可自取" right="true" style="margin-left: 10px;"></lang>
							</view> -->
						</view>
					</view>
					<view class="right">
						
						<view v-if="storeInfo.is_close == 1">
							<lang keywords="店铺休息中" class="txt"></lang>
						</view>
						<view class="reason" v-if="storeInfo.is_close != 1 && cartNum == 0 && orderStatus == 0">
							<view class="tip">{{currency + storeInfo.delivery_price}}<lang keywords="起送" :left="true"></lang></view>
							<view class="tip" v-if="mustBuy"><lang keywords="未点必选品" ></lang></view>
						</view>
						<view class="reason" v-if="storeInfo.is_close != 1 && deficit > 0 && !showAdd && orderStatus == 0">
							<view class="tip"><lang keywords="差X1起送" :X1="deficit" unit="yuanSymbol" ></lang></view>
							<view class="tip" v-if="mustBuy"><lang keywords="未点必选品" ></lang></view>
						</view>
						<view @tap="settleAccounts" v-if="storeInfo.is_close != 1 && !orderStatus && cartNum > 0 && (originTotalPrice >= storeInfo.delivery_price || showAdd)">
							<lang class="txt settle" v-if="!mustBuy" keywords="去结算" :style="'background:' + mainColor"></lang>
							<lang class="txt settle"  v-if="mustBuy" keywords="未点必选品" :style="'background:' + mainColor"></lang>
						</view>
						<view @tap="settleAccounts" v-if="storeInfo.is_close != 1 && orderStatus == 1">
							<lang class="txt settle" keywords="选好了" :style="'background:' + mainColor"></lang>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view :class="'mask ' + (showCart || showCollect ? 'active' : '')" @tap="closeMask($event)" data-name="showCart"></view>

		<!-- 年龄限制弹窗 -->
		<view :class="'age-limit-mask ' + (age_status == 1 ? 'input' : '')" v-if="showAgeMask" @tap="closeMask" data-name="showAgeMask">

			<block v-if="age_status == 2 || age_accept">
				<view class="age-limit-content" @click.stop="forbidClose">
					<view class="desc-box">
						<image class="img" :src="'https://hf.pigcms.com/static/wxapp/' + (age_accept ? 'limit-no.png' : 'limit.png')"
						 mode="widthFix"></image>
						<view class="title">{{age_accept ? storeInfo.check_age_object.age_tips_title0 : storeInfo.check_age_object.age_tips_title2}}</view>
						<view class="desc">{{age_accept ? storeInfo.check_age_object.age_tips0 : storeInfo.check_age_object.age_tips2}}</view>
						<view class="change-birth" @click.stop="gotoBirth">点击进入个人中心可修改生日<text class="iconfont icon-jiantou"></text></view>
					</view>
					<view class="btn-box" @click.stop="closeMask" data-name="showAgeMask"><button>
							<lang keywords="知道了"></lang>
						</button></view>
				</view>
			</block>

			<block v-if="age_status == 1">
				<view class="age-limit-content" @click.stop="forbidClose">
					<view class="desc-box birth">
						<view class="title">{{storeInfo.check_age_object.age_tips_title1}}<text>*</text></view>
						<view class="desc">{{storeInfo.check_age_object.age_tips1}}</view>
						<view class="input" @click.stop="clickShow" data-name="show_picker">
							<block v-if="birth.length == 0">
								<lang class="tip" keywords="请点击输入生日"></lang>
							</block>
							<text v-else>{{birth[0]}}/{{birth[1]}}/{{birth[2]}}</text>
						</view>
					</view>
					<view class="btn-box" @click.stop="saveBirth"><button>
							<lang keywords="确定"></lang>
						</button></view>
				</view>

				<view :class="'select-birth ' + (show_picker ? 'show' : '')" @click.stop="forbidClose">
					<view class="title">
						<lang keywords="取消" class="red" @click.stop="closeMask" data-name="show_picker"></lang>
						<lang keywords="选择日期"></lang>
						<lang keywords="确定" class="red" @click.stop="pickerConfirm"></lang>
					</view>
					<picker-view class="birth-picker" indicator-class="selected-item" :value="picker_value" catchchange="changeBirth">
						<picker-view-column>
							<view class="picker-item" v-for="(item, index) in years" :key="index">{{item}}</view>
						</picker-view-column>
						<picker-view-column>
							<view class="picker-item" v-for="(item, index) in months" :key="index">{{item}}</view>
						</picker-view-column>
						<picker-view-column>
							<view class="picker-item" v-for="(item, index) in days" :key="index">{{item}}</view>
						</picker-view-column>
					</picker-view>
				</view>
			</block>


		</view>
	</view>
</template>

<script>
	import common from '../../../../utils/common.js'
	import shopCommon from '../../../../utils/shop/addToCart.js'
	import count from "../count/count";
	import GoodsItem from '../goodsItem/goodsItem.vue';
	const date = new Date();
	const years = [];
	const months = [];
	const days = [];
	const first_value = date.getFullYear() - 1900;
	var check_age = false;
	var app = getApp()
	var _this

	export default {
		data() {
			return {
				// check_age: false, // 直接点击结算请求登录检查年龄
				years: years,
				// picker年数组
				months: months,
				// picker月数组
				days: days,
				// picker日数组
				picker_value: [first_value, date.getMonth(), date.getDate() - 1],
				// picker初始化日期
				birth: [],
				// picker选择的日期
				show_picker: false,
				// 是否显示picker
				age_accept: false,
				// 保存生日后是否通过年龄限制
				user_age: -1,
				// 用户生日
				open_multilingual: false,
				showAgeMask: false,
				showAddBtn: false, // 是否显示加价送按钮
				showAdd: false, // 购物车内是否显示加价送
				showCart: false, // 弹窗显示控制
				deficit: 0, // 差价
				mainColor: '', // 主颜色
				list: [],
				cartNum: 0, // 购物车总数
				totalPrice: 0, // 总价（优惠之后的）
				originTotalPrice: 0, // 未优惠之前的总价
				packPrice: 0, // 打包费
				storeInfo: '', // 店铺信息
				mustBuy: false, // 是否有必选分类需要选择
				discountTip: '', // 优惠引导
				collectGoods: [], // 凑单商品列表
				showCollect: false,
				currency: '¥',
				orderStatus: 0, // 0正常购买 1拼单购买
				orderTogether: {}
			};
		},
		components: {
			count,
			GoodsItem
		},
		props: {
			tag: {
				type: String,
				default: ''
			},
			currentTab: {
				type: Number,
				default: 0
			},
			refreshCart: {
				type: Boolean,
				default: false
			},
			isHomePage: {
				type: Boolean,
				default: false
			}
		},
		watch: {
			refreshCart: {
				immediate: true,
				handler (val) {
					if (val) {
						this.updateCart()
					}
				}
			}
		},
		mounted() {
			_this = this
			common.getConfig(function(data){
				_this.mainColor = data.config.mobile_head_color
				_this.currency = data.config.Currency_symbol
			})
			
			console.log('购物车数据初始化', app.globalData.storeInfo)
			this.storeInfo = app.globalData.storeInfo
			if (app.globalData.storeCart) {
				this.updateCart()
			}
			
			if (app.globalData.config && app.globalData.config.config && app.globalData.config.config.open_multilingual == 1) {
				this.open_multilingual = true;
			} else {
				this.open_multilingual = false;
			}
			
			if (this.storeInfo.required_sort && this.storeInfo.required_sort.sort_id) {
				this.mustBuy = true
			}
			
			
		},
		methods: {
			openCollectList () {
				this.showCollect = true
			},
			getGoods (e) {
				console.log('getGoods', e)
				console.log('第二次')
				this.$emit('getGoods', e)
			},
			numberToFixed (number) {
				if(String(number).indexOf(".") != -1) {
					number = number.toFixed(2) * 1
				}
				return number
			},
			// 更新购物车数据
			updateCart () {
				console.log('222222222222222更新购物车数据')
				let cartInfo = app.globalData.storeCart
				if (cartInfo) {
					this.list = cartInfo.goods_list
					this.cartNum = cartInfo.total_num
					this.totalPrice = cartInfo.total_price
					this.originTotalPrice = cartInfo.origin_total_price
					this.packPrice = cartInfo.pack_price
					this.deficit = this.numberToFixed(app.globalData.storeInfo.delivery_price - this.originTotalPrice)
					this.discountTip = cartInfo.tip
					this.collectGoods = cartInfo.collect_goods
					if (this.showCollect && this.collectGoods.length == 0) {
						this.showCollect = false
					}
					
					// 是否显示加价送
					this.showAdd = app.globalData.storeGoods.selectAdd ? true : false
					if (!this.showAdd) {
						if (cartInfo.extra_price > 0 && this.originTotalPrice*1 < cartInfo.base_price*1) {
							this.showAddBtn = true
						} else {
							this.showAddBtn = false	
						}
					}
					if (cartInfo.required_sort && cartInfo.required_sort.sort_id) {
						this.mustBuy = true
					} else {
						this.mustBuy = false
					}
				} else {
					this.resetCart()
				}
				var orderTogether = wx.getStorageSync('orderTogether')
				if (orderTogether && orderTogether.store_id == this.storeInfo.store_id) {
					this.orderTogether = orderTogether
					this.orderStatus = 1
				} else {
					this.orderStatus = 0
				}
				this.$forceUpdate()
				this.$emit('getGoods', {action: 'updateCartOver'})	
			},
			// 清空购物车
			clearCart() {
				_this = this;
				wx.showModal({
					title: common.changeTxt('提示'),
					content: common.changeTxt('您确定要清空购物车吗？'),
					success: res => {
						if (res.confirm) {
							let postUrl = ''
							let param = { 'store_id': app.globalData.storeInfo.store_id }
							if (_this.orderStatus == 1) {
								postUrl = 'Cart&a=clearSpellProduct'
								param.cartid = _this.orderTogether.cartId
								param.index = _this.orderTogether.myindex
							} else {
								postUrl = 'Cart&a=clear'
							}
							common.post(postUrl, param, function(data){
								console.log('清空购物车成功', data)
								_this.resetCart()
								_this.$emit('getGoods', {action: 'clearCart'})
							}, _this, (err) => {
								_this.resetCart()
								_this.$emit('getGoods', {action: 'clearCart'})
							})
						}
					}
				});
			},
			
			resetCart () {
				app.globalData.storeCart = null
				app.globalData.storeGoods = null
				this.list = []
				this.cartNum = 0
				this.totalPrice = 0
				this.originTotalPrice = 0
				this.packPrice = 0
				this.showCart = false 
				this.showAdd = false
				this.showAddBtn = false
				this.discountTip = ''
				this.collectGoods = []
				this.showCollect = false
				if (app.globalData.storeInfo.required_sort && app.globalData.storeInfo.required_sort.sort_id) {
					this.mustBuy = true
				} else {
					this.mustBuy = false
				}
			},

			// 跳转到个人中心修改生日
			gotoBirth() {
				console.log('66666666666666666', app.globalData.userInfo.birthday); // return 

				wx.navigateTo({
					url: `/pages/my/birth?birth=${app.globalData.userInfo.birthday}`
				});
				this.showAgeMask = false
			},

			// 选择生日的picker发生改变
			changeBirth(e) {
				var val = e.detail.value;
				this.picker_value = val;
				this.birth = [this.years[val[0]], this.months[val[1]], this.days[val[2]]];
			},

			// 选择生日的picker确定按钮
			pickerConfirm() {
				if (this.birth.length == 0) {
					this.birth = [date.getFullYear(), date.getMonth() + 1, date.getDate()];
				}
					
				this.show_picker = false
			},

			// 点击确定，保存生日
			saveBirth() {
				if (this.birth.length == 0) {
					wx.showToast({
						title: common.changeTxt('生日信息不能为空！'),
						icon: 'none',
						duration: 2000
					});
					return;
				}

				var _this = this;

				var param = {
					birthday: this.birth[0] + '-' + this.birth[1] + '-' + this.birth[2],
					store_id: this.storeInfo.store_id
				};
				common.post('My&a=birthday', param, data => {
					if (data) {
						app.globalData.userInfo.birthday = param.birthday;
						app.globalData.userInfo.age = data.age;
						_this.age_accept = data.age_tips_status === 0;

						_this.age_accept = _this.age_accept
						_this.age_status = data.age_tips_status
						_this.showAgeMask = true
					}
				});
			},

			// 点击打开购物车
			openCart() {
				if (this.cartNum === 0 || this.storeInfo.is_close === 1) {
					return;
				}
				this.showCart = !this.showCart
				this.showCollect = false
			},

			clickShow(e) {
				let name = e.currentTarget.dataset.name
				if (this[name] || (name == 'showCollect' && this.collectGoods.length == 0)) {
					return
				}
				if (name == 'showCollect') {
					this.showCart = false
				}
				this[name] = true
			},

			// 关闭弹窗
			closeMask(e) {
				if (e.currentTarget.dataset.name == 'showCart') {
					this.showCollect = false
				}
				this[e.currentTarget.dataset.name] = false
			},

			// 结算
			settleAccounts() {
				var _this = this
				if (this.storeInfo.is_close == 1) {
					wx.showToast({
						title: '店铺休息中',
						icon: 'none'
					});
					return;
				}
				if (this.mustBuy) {
					if (this.isHomePage && !this.showCart) {
						this.$emit('getGoods', {action: 'mustBuySort'})
					} else {
						wx.showToast({
							title: common.changeTxt('需要选择【X1】下的商品才可下单哦~', {X1: app.globalData.storeCart.required_sort.sort_name }),
							icon: 'none'
						})
					}
					return
				}
				
				var deliverExtraPrice = 0;
				if (this.showAdd == true) {
					deliverExtraPrice = this.storeInfo.extra_price;
				}
				this.showCollect = false
				if (this.orderStatus == 0) {
					wx.navigateTo({
						url: '/pages/shop_new/confirmOrder/newCart?store_id=' + this.storeInfo.store_id + '&deliverExtraPrice=' + deliverExtraPrice
					});
				} else if (app.globalData.pinUrl) {
					wx.navigateTo({
						url: app.globalData.pinUrl
					});
				} else {
					wx.navigateTo({
						url: '/pages/shop_new/orderTogether/orderTogether?store_id=' + this.storeInfo.store_id
					});
				}
			},

			// 加价送
			addMoney() {
				let _this = this
				this.showAddBtn = false
				this.showAdd = true
				app.globalData.storeGoods.selectAdd = true
				shopCommon.updateCart({store_id: this.storeInfo.store_id}).then(function(){
					_this.updateCart()
				})
			},

			// 取消加价送
			cancelAdd() {
				this.showAdd = false
				app.globalData.storeGoods.selectAdd = false
				shopCommon.updateCart({store_id: this.storeInfo.store_id}).then(function(){
					_this.updateCart()
				})
			}
		}
	};
</script>
<style>
	.block-in {
		display: inline-block;
	}

	.border-t {
		position: relative;
	}

	.border-t::after {
		content: '';
		position: absolute;
		top: 0;
		left: 10px;
		height: 1rpx;
		width: 100%;
		background: #e5e5e5;
		transform: scaleY(0.5);
	}

	.border-b::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0px;
		height: 1rpx;
		width: 100%;
		background: #e5e5e5;
		transform: scaleY(0.5);
	}

	/* 店内购物车样式 */
	.shop-cart {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
	}

	.shop-cart .tips {
		background: #FFF0D1;
		font-size: 12px;
		height: 30px;
		line-height: 30px;
		text-align: center;
		color: #CA661A;
	}

	.shop-cart .tips .btn {
		margin-left: 5px;
	}

	.shop-cart .cart {
		height: 50px;
		height: calc(50px + env(safe-area-inset-bottom));
		height: calc(50px + constant(safe-area-inset-bottom));
		background-color: #ff5a00;
		color: #fff;
		padding-left: 70px;
		font-size: 16px;
		position: relative;
	}

	.shop-cart .icon {
		position: absolute;
		left: 10px;
		top: -10px;
		width: 50px;
		height: 50px;
		line-height: 50px;
		text-align: center;
		background: #202020;
		border-radius: 50%;
		z-index: 999;
	}

	.shop-cart .icon.active {
		background: #06c1ae;
		color: #fff;
	}

	.shop-cart .icon .iconfont {
		font-size: 30px;
	}

	.shop-cart .icon .num {
		font-size: 10px;
		width: 18px;
		height: 18px;
		text-align: center;
		line-height: 18px;
		background: #ff3c00;
		border-radius: 50%;
		color: #fff;
		position: absolute;
		top: -3px;
		right: -3px;
	}

	.shop-cart .info {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 100%;
	}

	.shop-cart .left .delivery {
		font-size: 14px;
	}

	.shop-cart .left .total .price {
		font-size: 20px;
		color: #fff;
	}

	.shop-cart .left .total .fee {
		font-size: 12px;
	}

	.shop-cart .right {
		height: 100%;
		line-height: 50px;
		line-height: calc(50px + env(safe-area-inset-bottom));
		line-height: calc(50px + constant(safe-area-inset-bottom));
	}

	.shop-cart .right .txt {
		display: inline-block;
		vertical-align: top;
		height: 100%;
		width: 90px;
		text-align: center;
	}
	.shop-cart .right .reason{
		padding: 0 20px;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		font-size: 14px;
	}
	.shop-cart .right .reason .tip{
		line-height: 1.4;
	}

	.shop-cart .settle {
		background: #06c1ae;
		color: #fff;
		display: block;
	}
	
	.shop-cart .cart-goods{
		max-height: 0;
		height: 0;
		transition: all .3s;
	}
	
	.shop-cart .cart-goods.active{
		height: auto;
		max-height: 267px;
	}

	.mask {
		background: rgba(0, 0, 0, .5);
		z-index: 100;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		height: 0;
	}

	.mask.active {
		height: 100%;
	}

	.select-goods {
		background: #fff;
		padding-bottom: 20px;
		max-height: 230px;
		overflow-y: scroll;
	}

	.line-wrapper {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 10px;
		background: #f4f4f4;
		font-size: 12px;
		color: #333;
	}

	.line-wrapper .flex {
		display: flex;
		align-content: center;
		align-items: center;
	}

	.line-wrapper .icon-shanchu {
		font-size: 16px;
	}

	.select-goods .goods-items {
		background: #fff;
		position: relative;
		padding: 15px 10px;
		font-size: 16px;
		min-height: 30px;
	}

	.select-goods .goods-items>view {
		flex: 1;
	}

	.select-goods .goods-items .name {
		flex: 3;
		font-size: 14px;
	}

	.select-goods .goods-items .flavor {
		font-size: 12px;
		color: #999;
		margin-right: 5px;
	}
	.select-goods .goods-items .add-btn{
		display: flex;
		align-items: center;
	}
	.select-goods .goods-items .add-btn .iconfont{
		color: #06c1ae;
		text-align: right;
		flex: 1;
		font-size: 26px;
	}
	
	.select-goods .goods-items .add-btn .num{
		padding: 0 3px;
		color: #333;
		width: 20px;
		text-align: center;
		display: inline-block;
	}
	
	.collect-list.select-goods .goods-items{
		padding: 6px 10px;
	} 
	.collect-list.select-goods .border-b:last-child::after{
		height: 0;
	}
	.collect-list{
		max-height: 0;
		height: 0;
		padding-bottom: 0;
		transition: all .3s;
	}
	
	.collect-list.active{
		height: auto;
		padding-bottom: 20px;
		max-height: 230px;
	}
	
	.age-limit-mask {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, .7);
		z-index: 99999;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.age-limit-mask.input {
		flex-direction: column;
		justify-content: flex-end;
	}

	.age-limit-content {
		background: #fff;
		width: 90%;
		border-radius: 10px;
		overflow: hidden;
	}

	.age-limit-content .desc-box {
		box-sizing: border-box;
		padding: 50rpx;
		text-align: center;
	}

	.age-limit-content .desc-box .img {
		width: 28%;
		height: 100px;
		margin: 0 auto;
	}

	.age-limit-content .desc-box .title {
		text-align: center;
		font-size: 20px;
		font-weight: bold;
		line-height: 1.5;
		letter-spacing: 1px;
		margin-top: 30rpx;
		padding: 0 100rpx;
	}

	.age-limit-content .desc-box .desc {
		line-height: 1.5;
		color: #999;
		font-size: 15px;
		margin-top: 30rpx;
		text-align: center;
	}

	.age-limit-content .desc-box .change-birth {
		color: #ff1940;
		font-size: 12px;
		text-align: center;
		line-height: 1.5;
	}

	.age-limit-content .desc-box .change-birth .iconfont {
		vertical-align: middle;
	}

	.age-limit-content .btn-box button {
		color: #ff1940;
		font-size: 16px;
		padding: 16rpx 0;
		font-weight: bold;
		background: #f7f7f7;
		letter-spacing: 1px;
	}

	.age-limit-content .desc-box.birth {
		padding: 50rpx 30rpx;
	}

	.age-limit-content .desc-box.birth .title {
		padding: 0;
		text-align: left;
	}

	.age-limit-content .desc-box.birth .title text {
		color: #ff1940;
	}

	.age-limit-content .desc-box.birth .desc {
		text-align: left;
	}

	.age-limit-content .desc-box.birth .input {
		border-bottom: 1px solid #999;
		padding: 30rpx 0;
		margin: 30rpx 0 60rpx;
	}

	.age-limit-content .desc-box.birth .input .tip {
		color: #999;
		font-size: 18px;
	}

	.select-birth {
		width: 100%;
		height: 30%;
		max-height: 250px;
		margin-top: 20px;
		background: #fff;
		transform: translateY(100%);
		transition: all .3s;
	}

	.select-birth.show {
		transform: translateY(0);
	}

	.select-birth .title {
		height: 50px;
		line-height: 50px;
		display: flex;
		justify-content: space-between;
		font-size: 18px;
		font-weight: 500;
	}

	.select-birth .title .red {
		color: #ff1940;
		font-size: 16px;
		padding: 0 40rpx;
	}

	.select-birth .birth-picker {
		width: 100%;
		height: calc(100% - 50px);
	}

	.select-birth .birth-picker .picker-item {
		text-align: center;
		line-height: 30px;
		height: 30px;
	}


	@font-face {
		font-family: 'iconfont';
		/* project id 792293 */
		src: url('//at.alicdn.com/t/font_792293_n3et2qdxvvq.eot');
		src: url('//at.alicdn.com/t/font_792293_n3et2qdxvvq.eot?#iefix') format('embedded-opentype'),
			url('//at.alicdn.com/t/font_792293_n3et2qdxvvq.woff2') format('woff2'),
			url('//at.alicdn.com/t/font_792293_n3et2qdxvvq.woff') format('woff'),
			url('//at.alicdn.com/t/font_792293_n3et2qdxvvq.ttf') format('truetype'),
			url('//at.alicdn.com/t/font_792293_n3et2qdxvvq.svg#iconfont') format('svg');
	}

	.iconfont {
		font-family: "iconfont" !important;
		font-size: 16px;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	.icon-gouwuche1:before {
		content: "\e7bc";
	}

	.icon-shanchu:before {
		content: "\e68e";
	}

	.icon-jian:before {
		content: "\e7de";
	}

	.icon-gou:before {
		content: "\e611";
	}

	.icon-quan:before {
		content: "\e615";
	}

	.icon-jiantou:before {
		content: "\e601";
	}
</style>
